//////////////////////////////////////////////////
// glTexture2D.h
//
// Author: Tarik Belabbas et Adrien Hoffer
//////////////////////////////////////////////////

#ifndef GLTEXTURE2D_H_
#define GLTEXTURE2D_H_

#define GL_GLEXT_PROTOTYPES

#include <GL/gl.h>
#include <string>

#define TEXTURE_PATH "data/textures/"

class glTexture2D
{
public:
	glTexture2D		();
	glTexture2D		( const char* _texturePath );

	~glTexture2D	();

	void		setTexturePath	( const char* _texturePath );
	void		setTextureName	( const char* _textureName );

	void		loadTexture		();
	void		loadTexturePath	( const char* _texturePath );
	void		loadTextureName	( const char* _textureName );

	void		unload			();

	void		bindTexture		();

//	const glTexture2D&	operator=	( const glTexture2D& _texture );

protected:
	void		init		();

	// Members
	GLuint		m_texture;
	std::string	m_texturePath;

	bool		m_isLoaded;

	static int	m_loadCount;
};

#endif /* GLTEXTURE2D_H_ */
